package com.example.springboot3005web.controller;


import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ExamPathController {

    // 使用 ？ 匹配单个字符
    @GetMapping("/file/t?st.html")
    public String path1(HttpServletRequest request) {

        return "path1请求：" + request.getRequestURI();
    }


    // 使用 * 匹配0个或者多个字符
    @GetMapping("/file/*.html")
    public String path2(HttpServletRequest request) {

        return "path2请求：" + request.getRequestURI();
    }


}
